//
//  PersonCell.m
//  ImGuider
//
//  Created by 王鹏宇 on 2017/12/13.
//  Copyright © 2017年 AudioCtrip. All rights reserved.
//

#import "PersonCell.h"

@implementation PersonCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.selectionStyle =  UITableViewCellSelectionStyleNone;
    self.nameLabel.textColor = kSubitleColor;
    self.enNameLabel.textColor = kContentColor;
    self.ticketTypeLabel.textColor = kContentColor;
    self.priceLabel.textColor = kThemeColor;
}

- (void)configDataWith:(TicketMemberInfoModel *)model {
    
    self.nameLabel.text = model.realname;
    self.enNameLabel.text = [NSString stringWithFormat:@"%@ / %@",model.firstname,model.lastname];
    self.priceLabel.text = model.ticketPrice;
    
    NSString * typeStr = MYLocalizedString(@"TICKET_TYPE_ADULT", nil);
    switch (model.ticketType.integerValue) {
        case 1:
            typeStr = MYLocalizedString(@"TICKET_TYPE_ADULT", nil);
            break;
        case 2:
            typeStr = MYLocalizedString(@"TICKET_TYPE_CHILDREN", nil);
            break;
        case 3:
            typeStr = @"长者票";
            break;
        case 4:
            typeStr = @"团体票";
            break;
        default:
            break;
    }
    self.ticketTypeLabel.text = typeStr;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
